.class public Lde/dealdoktor/app/adapter/PostListAdapter;
.super Landroid/widget/BaseAdapter;
.source "PostListAdapter.java"


# instance fields
.field private asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

.field private bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

.field private c:Landroid/database/Cursor;

.field private context:Lde/dealdoktor/app/activities/SuperListing;

.field private defaultBitmap:Landroid/graphics/Bitmap;

.field public postList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/PostDAO;",
            ">;"
        }
    .end annotation
.end field

.field private results:Landroid/widget/ListView;


# direct methods
.method public constructor <init>(Ljava/util/ArrayList;Lde/dealdoktor/app/activities/SuperListing;Landroid/widget/ListView;)V
    .locals 2
    .parameter
    .parameter "context"
    .parameter "results"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/PostDAO;",
            ">;",
            "Lde/dealdoktor/app/activities/SuperListing;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .prologue
    .line 42
    .local p1, c:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/data/PostDAO;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 43
    invoke-virtual {p1}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    iput-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    .line 44
    iput-object p2, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->context:Lde/dealdoktor/app/activities/SuperListing;

    .line 45
    iput-object p3, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->results:Landroid/widget/ListView;

    .line 47
    new-instance v0, Lde/dealdoktor/app/util/AsyncImageLoader;

    invoke-direct {v0}, Lde/dealdoktor/app/util/AsyncImageLoader;-><init>()V

    iput-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

    .line 48
    invoke-virtual {p2}, Lde/dealdoktor/app/activities/SuperListing;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f02000a

    invoke-static {v0, v1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->defaultBitmap:Landroid/graphics/Bitmap;

    .line 50
    new-instance v0, Lde/dealdoktor/app/db/BaseModel;

    const-string v1, "bookmarks"

    invoke-direct {v0, p2, v1}, Lde/dealdoktor/app/db/BaseModel;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    .line 51
    return-void
.end method

.method static synthetic access$1(Lde/dealdoktor/app/adapter/PostListAdapter;)Lde/dealdoktor/app/activities/SuperListing;
    .locals 1
    .parameter

    .prologue
    .line 33
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->context:Lde/dealdoktor/app/activities/SuperListing;

    return-object v0
.end method

.method static synthetic access$2(Lde/dealdoktor/app/adapter/PostListAdapter;)Landroid/widget/ListView;
    .locals 1
    .parameter

    .prologue
    .line 36
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->results:Landroid/widget/ListView;

    return-object v0
.end method

.method private setBookmarkImage(Landroid/widget/ImageView;I)V
    .locals 3
    .parameter "bookmarkImage"
    .parameter "id"

    .prologue
    .line 164
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    const-string v1, "id"

    invoke-static {p2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lde/dealdoktor/app/db/BaseModel;->getBy(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->c:Landroid/database/Cursor;

    .line 165
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->c:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 166
    const v0, 0x7f020026

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 170
    :goto_0
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->c:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 171
    return-void

    .line 168
    :cond_0
    const v0, 0x7f020027

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method


# virtual methods
.method public addData(Ljava/util/ArrayList;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/PostDAO;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 79
    .local p1, c:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/data/PostDAO;>;"
    if-eqz p1, :cond_0

    .line 80
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 81
    invoke-virtual {p0}, Lde/dealdoktor/app/adapter/PostListAdapter;->notifyDataSetChanged()V

    .line 83
    :cond_0
    return-void
.end method

.method public addDataToTop(Ljava/util/ArrayList;)V
    .locals 2
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/PostDAO;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 74
    .local p1, c:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/data/PostDAO;>;"
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    const/4 v1, 0x0

    invoke-virtual {v0, v1, p1}, Ljava/util/ArrayList;->addAll(ILjava/util/Collection;)Z

    .line 75
    invoke-virtual {p0}, Lde/dealdoktor/app/adapter/PostListAdapter;->notifyDataSetChanged()V

    .line 76
    return-void
.end method

.method public clear()V
    .locals 1

    .prologue
    .line 54
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 55
    invoke-virtual {p0}, Lde/dealdoktor/app/adapter/PostListAdapter;->notifyDataSetChanged()V

    .line 56
    return-void
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 60
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Lde/dealdoktor/app/data/PostDAO;
    .locals 1
    .parameter "position"

    .prologue
    .line 65
    iget-object v0, p0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/data/PostDAO;

    return-object v0
.end method

.method public bridge synthetic getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    invoke-virtual {p0, p1}, Lde/dealdoktor/app/adapter/PostListAdapter;->getItem(I)Lde/dealdoktor/app/data/PostDAO;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 70
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 25
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 87
    move-object/from16 v0, p0

    iget-object v0, v0, Lde/dealdoktor/app/adapter/PostListAdapter;->postList:Ljava/util/ArrayList;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    move/from16 v1, p1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lde/dealdoktor/app/data/PostDAO;

    .line 89
    .local v13, item:Lde/dealdoktor/app/data/PostDAO;
    move-object/from16 v17, p2

    .line 90
    .local v17, rowView:Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v0, v0, Lde/dealdoktor/app/adapter/PostListAdapter;->context:Lde/dealdoktor/app/activities/SuperListing;

    move-object/from16 v21, v0

    const-string v22, "layout_inflater"

    invoke-virtual/range {v21 .. v22}, Lde/dealdoktor/app/activities/SuperListing;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Landroid/view/LayoutInflater;

    .line 91
    .local v11, infl:Landroid/view/LayoutInflater;
    if-nez v17, :cond_0

    .line 92
    const v21, 0x7f030014

    const/16 v22, 0x0

    move/from16 v0, v21

    move-object/from16 v1, v22

    invoke-virtual {v11, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v17

    .line 94
    :cond_0
    const v21, 0x7f0b0038

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v20

    check-cast v20, Landroid/widget/TextView;

    .line 95
    .local v20, title:Landroid/widget/TextView;
    const v21, 0x7f0b001f

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v14

    check-cast v14, Landroid/widget/TextView;

    .line 96
    .local v14, rating:Landroid/widget/TextView;
    const v21, 0x7f0b001d

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v18

    check-cast v18, Landroid/widget/TextView;

    .line 97
    .local v18, sparPotential:Landroid/widget/TextView;
    const v21, 0x7f0b0010

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v12

    check-cast v12, Landroid/widget/TextView;

    .line 98
    .local v12, info:Landroid/widget/TextView;
    const v21, 0x7f0b0042

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    .line 99
    .local v6, commentsCount:Landroid/widget/TextView;
    const v21, 0x7f0b0041

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v19

    check-cast v19, Landroid/widget/LinearLayout;

    .line 100
    .local v19, sparPotentialLayout:Landroid/widget/LinearLayout;
    const v21, 0x7f0b0040

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v15

    check-cast v15, Landroid/widget/LinearLayout;

    .line 101
    .local v15, ratingLayout:Landroid/widget/LinearLayout;
    const v21, 0x7f0b003f

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/ImageView;

    .line 103
    .local v9, image:Landroid/widget/ImageView;
    const v21, 0x7f0b0021

    move-object/from16 v0, v17

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    .line 104
    .local v4, bookmarkImage:Landroid/widget/ImageView;
    iget v0, v13, Lde/dealdoktor/app/data/PostDAO;->id:I

    move/from16 v21, v0

    move-object/from16 v0, p0

    move/from16 v1, v21

    invoke-direct {v0, v4, v1}, Lde/dealdoktor/app/adapter/PostListAdapter;->setBookmarkImage(Landroid/widget/ImageView;I)V

    .line 105
    new-instance v21, Lde/dealdoktor/app/adapter/PostListAdapter$1;

    move-object/from16 v0, v21

    move-object/from16 v1, p0

    invoke-direct {v0, v1, v13}, Lde/dealdoktor/app/adapter/PostListAdapter$1;-><init>(Lde/dealdoktor/app/adapter/PostListAdapter;Lde/dealdoktor/app/data/PostDAO;)V

    move-object/from16 v0, v21

    invoke-virtual {v4, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 112
    const-string v10, ""

    .line 114
    .local v10, imageUrl:Ljava/lang/String;
    :try_start_0
    new-instance v21, Ljava/net/URI;

    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->image:Ljava/lang/String;

    move-object/from16 v22, v0

    invoke-direct/range {v21 .. v22}, Ljava/net/URI;-><init>(Ljava/lang/String;)V

    invoke-virtual/range {v21 .. v21}, Ljava/net/URI;->toASCIIString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/net/URISyntaxException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v10

    .line 118
    :goto_0
    const-string v21, ""

    move-object/from16 v0, v21

    if-eq v10, v0, :cond_3

    .line 119
    new-instance v21, Ljava/lang/StringBuilder;

    invoke-static {v10}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v22

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static/range {p1 .. p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v22

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v9, v0}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    .line 120
    move-object/from16 v0, p0

    iget-object v0, v0, Lde/dealdoktor/app/adapter/PostListAdapter;->asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

    move-object/from16 v21, v0

    new-instance v22, Lde/dealdoktor/app/adapter/PostListAdapter$2;

    move-object/from16 v0, v22

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lde/dealdoktor/app/adapter/PostListAdapter$2;-><init>(Lde/dealdoktor/app/adapter/PostListAdapter;)V

    .line 127
    move-object/from16 v0, p0

    iget-object v0, v0, Lde/dealdoktor/app/adapter/PostListAdapter;->context:Lde/dealdoktor/app/activities/SuperListing;

    move-object/from16 v23, v0

    invoke-virtual/range {v23 .. v23}, Lde/dealdoktor/app/activities/SuperListing;->getResources()Landroid/content/res/Resources;

    move-result-object v23

    const v24, 0x7f02000a

    invoke-virtual/range {v23 .. v24}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v23

    invoke-static/range {p1 .. p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v24

    .line 120
    move-object/from16 v0, v21

    move-object/from16 v1, v22

    move-object/from16 v2, v23

    move-object/from16 v3, v24

    invoke-virtual {v0, v10, v1, v2, v3}, Lde/dealdoktor/app/util/AsyncImageLoader;->loadDrawable(Ljava/lang/String;Lde/dealdoktor/app/util/AsyncImageLoader$ImageCallbackDrawable;Landroid/graphics/drawable/Drawable;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v5

    .line 129
    .local v5, cachedImage:Landroid/graphics/drawable/Drawable;
    invoke-virtual {v9, v5}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 134
    .end local v5           #cachedImage:Landroid/graphics/drawable/Drawable;
    :goto_1
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->title:Ljava/lang/String;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v21

    invoke-virtual/range {v20 .. v21}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 135
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    move-object/from16 v21, v0

    const-string v22, ""

    move-object/from16 v0, v21

    move-object/from16 v1, v22

    if-eq v0, v1, :cond_4

    .line 136
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    move-object/from16 v16, v0

    .line 137
    .local v16, ratingString:Ljava/lang/String;
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    move-object/from16 v21, v0

    const-string v22, "0"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-nez v21, :cond_1

    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    move-object/from16 v21, v0

    const-string v22, "-"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v21

    if-nez v21, :cond_1

    .line 139
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, " +"

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v16

    .line 141
    :cond_1
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, "<b>"

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    const-string v22, "</b> Votes"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v14, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 142
    const/16 v21, 0x0

    move/from16 v0, v21

    invoke-virtual {v15, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 147
    .end local v16           #ratingString:Ljava/lang/String;
    :goto_2
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->sparPotential:Ljava/lang/String;

    move-object/from16 v21, v0

    const-string v22, ""

    move-object/from16 v0, v21

    move-object/from16 v1, v22

    if-eq v0, v1, :cond_5

    .line 148
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, "<b>"

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->sparPotential:Ljava/lang/String;

    move-object/from16 v22, v0

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    const-string v22, "\u20ac</b> Ersparnis"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v21

    move-object/from16 v0, v18

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 149
    const/16 v21, 0x0

    move-object/from16 v0, v19

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 153
    :goto_3
    iget-object v0, v13, Lde/dealdoktor/app/data/PostDAO;->date:Ljava/lang/String;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lde/dealdoktor/app/util/Util;->formatDate(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v12, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 154
    iget v0, v13, Lde/dealdoktor/app/data/PostDAO;->commentsCount:I

    move/from16 v21, v0

    invoke-static/range {v21 .. v21}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    .line 155
    .local v7, commentsCountString:Ljava/lang/String;
    iget v0, v13, Lde/dealdoktor/app/data/PostDAO;->commentsCount:I

    move/from16 v21, v0

    const/16 v22, 0xa

    move/from16 v0, v21

    move/from16 v1, v22

    if-ge v0, v1, :cond_2

    .line 156
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, " "

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 158
    :cond_2
    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 160
    return-object v17

    .line 115
    .end local v7           #commentsCountString:Ljava/lang/String;
    :catch_0
    move-exception v8

    .line 116
    .local v8, e:Ljava/net/URISyntaxException;
    const-string v21, "exception"

    const-string v22, "PostListing getView"

    move-object/from16 v0, v21

    move-object/from16 v1, v22

    invoke-static {v0, v1, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_0

    .line 131
    .end local v8           #e:Ljava/net/URISyntaxException;
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lde/dealdoktor/app/adapter/PostListAdapter;->defaultBitmap:Landroid/graphics/Bitmap;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    invoke-virtual {v9, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    goto/16 :goto_1

    .line 144
    :cond_4
    const/16 v21, 0x4

    move/from16 v0, v21

    invoke-virtual {v15, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto/16 :goto_2

    .line 151
    :cond_5
    const/16 v21, 0x4

    move-object/from16 v0, v19

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_3
.end method
